﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Betop.Lib.Data;

namespace Betop.Lib.Core.Tree
{
    public partial class TreeInfo:EntityBase
    {       
        public TreeInfo() { }
        public int ID
        {
            get;
            set;
        }
        public string Name
        {
            get;
            set;
        }
        public int UpperID
        {
            get;
            set;
        }
        public string Path
        {
            get;
            set;
        }
        public int Depth
        {
            get;
            set;
        }
        public int Orders
        {
            get;
            set;
        }

        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "upperid":
                    this.UpperID = (Int32)value;
                    break;
                case "depth":
                    this.Depth = (Int32)value;
                    break;
                case "path":
                    this.Path = (String)value;
                    break;
                case "orders":
                    this.Orders = (Int32)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "name":
                    return this.Name;
                case "upperid":
                    return this.UpperID;
                case "depth":
                    return this.Depth;
                case "path":
                    return this.Path;
                case "orders":
                    return this.Orders;
                default:
                    return null;
            }
        }


        public override string GetTableName()
        {
            return "";
        }

        public override string GetInsertSql()
        {
            return "";
        }

        public override string GetUpdateSql()
        {
            return "";
        }
    }
}
